home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20020314-20021006
/
000358_fdc@columbia.edu_Thu Sep 12 10:16:38 EDT 2002.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
3KB
|
67 lines
Article: 13690 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
From: fdc@columbia.edu (Frank da Cruz)
Newsgroups: comp.unix.aix,comp.protocols.kermit.misc
Subject: Re: renaming files
Date: 12 Sep 2002 10:14:36 -0400
Organization: Columbia University
Lines: 50
Message-ID: <alq7gc$12b$1@watsol.cc.columbia.edu>
References: <alplgq$ks8$1@sp15at20.hursley.ibm.com>
NNTP-Posting-Host: watsol.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1031840077 2384 128.59.39.139 (12 Sep 2002 14:14:37 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 12 Sep 2002 14:14:37 GMT
Xref: newsmaster.cc.columbia.edu comp.unix.aix:240229 comp.protocols.kermit.misc:13690
In article <alplgq$ks8$1@sp15at20.hursley.ibm.com>, Me <me@u.com> wrote:
: I wonder if anyone can help with a small script file that I need to write.
: I need to automatically FTP some files that have the following naming
: convention :-
:
: Day of month
: | Hour and minute stamp
: | |
: \/ \/
: log.11-10-30
: log.11-3-45
: log.11-5-30
: log.9-10-30
: log.9-5-45
: log.10-10-0
: ...
:
: I'm fine with automating the FTP but the problem is, FTP doesn't like the
: '-' in the naming convention and replaces it with a '#' when it writes it to
: the other system.
:
When you say you need to "ftp" them, do you mean PUT or GET? The mechanics
are different in the two cases, and also depend on the target system.
For example, if you are sending these files to an 8.3 filesystem such as
FAT on DOS, Windows, or OS/2, obviously the timestamp will be truncated.
I can't imagine why a hyphen might cause trouble but...
: What I need to do is run a script that would rename the files, replacing
: the '-' with an 'x' or something.
:
The Kermit FTP client can do this:
http://www.columbia.edu/kermit/ftpscripts.html
Unlike other FTP clients, it is designed from the beginning to be scripted:
http://www.columbia.edu/kermit/ftpscripts.html
If you can explain the scenario in a bit more detail I can give more
specific help. Assuming that all you need to do is what you say (i.e.
convert the hyphen to some other character like 'x'), it's done like this:
mput /as-name:\freplace(\v(filename),-,x) log.*
The /as-name:xxx switch specifies a template for converting the filenames.
The \freplace() function replaces substrings of the given string with
another string of your choice; in this case it's replacing all hyphens in
each filename with 'x'.
- Frank